import { toRaw } from 'vue';
import { float_info_operate } from './Classes/cla_float_info_operate';
import { create_winload } from '../../../../global/win_load';
import {
  props_win_load_float_info,
  spacename_float_info,
} from './DataDefine/sourceData';

function before_fi(props) {
  if (props?.id != undefined) {
    return;
  }
  props = toRaw(props);
  const win_load_fi = create_winload(spacename_float_info);
  // 设定 如果是 跳转 过来的 本地 存了 float_keyVal 信息
  let win_load_float_keyVal = win_load_fi.get_winload_key(
    props_win_load_float_info.float_keyVal
  );

  if (win_load_float_keyVal != null) {
    props.keyVal = win_load_float_keyVal;
    props.id = win_load_float_keyVal.slice(1);
  }
}

function init_fi(props) {
  let o = new float_info_operate(props);
  o;
}

export { init_fi, before_fi };
